package com.longagoewk.springboot.controller.clientController;

import com.longagoewk.springboot.entity.MuseumBean;
import com.longagoewk.springboot.service.MuseumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class IntroduceController {

    @Autowired
    MuseumService museumService;

    @RequestMapping("/introduce")
    public ModelAndView introduce(){
        ModelAndView view = new ModelAndView();
        MuseumBean museumBean = new MuseumBean();
        museumBean.setMname("鄂温克旗博物馆");
        museumBean = museumService.getMuseum(museumBean);
        view.addObject("museum",museumBean);
        view.setViewName("client/introduce");
        return view;
    }

}
